<?php

$mod = $_GET['module'];

// Periksa apakah pengguna tidak login, redirect ke halaman login (index.php)
if (!isset($_SESSION['namauser'])) {
    // header('location:index.php');
    echo "<script>location.href = 'index.php';</script>";
    return;
}

if ($mod == 'home') {
    echo "<div style='text-align: center;'>";
    echo "<h1 align=center>Selamat Datang</h1>";
    echo "<h3>Hai, <b>" . $_SESSION['namauser'] . " </b> Selamat datang  di Aplikasi Administrasi Penerimaan Siswa Baru PAUD & TK LPMA Mentari Bangkit</h3>";
    echo "<img src='images/gambar2.jpg'></img>";
    echo "</div>";
} elseif ($mod == 'tahunajaran') {
    include "modul/tahunajaran/tahunajaran.php";
    
} elseif ($mod == 'siswa') {
    include "modul/siswa/siswa.php";
    
}
//buatlah form user berdasarkan form anggota
elseif ($mod == 'simpanan') {
    include "modul/simpanan/simpanan.php";
}
//buatlah form pengambilan berdasarkan form simpanan
elseif ($mod == 'laporan') {
    include "modul/laporan/cari.php";
    
} elseif ($mod == 'lapperlengkapan') {
    include "modul/lapperlengkapan/cari2.php";
    
} elseif ($mod == 'lapspp') {
    include "modul/lapspp/cari3.php";
    
} elseif ($mod == 'grafik') {
    include "modul/grafik/filter_grafik.php";
    
} elseif ($mod == 'gantipassword') {
    include "modul/user/password.php";
    
} elseif ($mod == 'manageuser') {
    include "modul/user/user.php";
    
} else {
    echo "<b>MODUL BELUM ADA ATAU BELUM LENGKAP SILAHKAN BUAT SENDIRI</b>";
}
?>